--
-- Created by IntelliJ IDEA.
-- User: wzq
-- Date: 16-10-8
-- Time: 下午5:36
-- desc: 发送多个请求
--

local request = require('request')


local _M = {}
_M.__index = _M

function _M:new()
  local obj = { reqs = {} }
  setmetatable(obj, self)
  return obj
end

-- add a option
function _M:getChildren2(path)
  table.insert(self.reqs, { type = request.OP_CODES.GET_CHILDREN2, path = path })
  return this
end

-- send request
function _M:commit()
  local header = { xid = _status.xid, type = request.OP_CODES.MULTI }
  local payload = new request.multiRequst(self.reqs)
end

return _M